<%@include file="/WEB-INF/pages/commons/commons.jsp"%>
<%@include file="/WEB-INF/pages/commons/commons.jsp"%>

<fmt:message var="title" key="view_resources.jsp.title" scope="request"/>
<stripes:layout-render name="${_themePath}/basic-layout-without-navbar.jsp" _title="${title}">

    <stripes:layout-component name="_topNav">
            <H1>Blog Management</H1>
            <UL class="gc-topnav-tabs">
                <LI>&nbsp;</LI>
            </UL>
    </stripes:layout-component>


    <stripes:layout-component name="_content">
        <h2>Add</h2>
        <jsecurity:lacksPermission name="blog:addResource:${actionBean.blogEntry.blog.id}">
            No "blog:addResource:${actionBean.blogEntry.blog.id}" permission
        </jsecurity:lacksPermission>

        <jsecurity:hasPermission name="blog:addResource:${actionBean.blogEntry.blog.id}">
        <stripes:messages/>
        <stripes:form beanclass="foo.bar.blog.web.action.registered.BlogsProfileActionBean" method="POST" enctype="multipart/form-data">
            <stripes:errors/>
            <input type="hidden" name="resource" value=""/>
            <input type="hidden" name="blogEntry" value="${actionBean.blogEntry.id}"/>
            <table width="100%">
                <tr>
                    <td><stripes:label name="resource.name"/></td>
                    <td><stripes:text name="resource.name"/></td>
                </tr>
                <tr>
                    <td><stripes:label name="resource.description"/></td>
                    <td><stripes:text name="resource.description"/></td>
                </tr>
                <tr>
                    <td><stripes:label name="resourceFile"/></td>
                    <td><stripes:file name="resourceFile"/></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <stripes:submit id="saveResource" name="saveResource"><fmt:message key="add_resource.jsp.saveResource"/></stripes:submit>
                    </td>
                </tr>
            </table>
        </stripes:form>
        </jsecurity:hasPermission>
    </stripes:layout-component>
</stripes:layout-render>
